package com.polaris.live.ui.web.js

import android.webkit.JavascriptInterface
import com.just.agentweb.AgentWeb
import com.polaris.live.ui.web.WebActivity

/**
 * js交互
 *
 * @author Created by lucas on 2023/10/24 11:57
 * @since 1.0.0
 */
class JsBridgeProxy(
    activity: WebActivity,
    agent: AgentWeb,
    url: String,
) : AbstractJsBridgeProxy(activity, agent, url) {

    @JavascriptInterface
    override fun directPage(routeUrl: String) {
        super.directPage(routeUrl)
    }

    @JavascriptInterface
    override fun clearWebCache() {
        super.clearWebCache()
    }

    @get:JavascriptInterface
    override val appVersion: String
        get() = super.appVersion

    @get:JavascriptInterface
    override val accessToken: String
        get() = super.accessToken

    @get:JavascriptInterface
    override val appConfig: String
        get() = super.appConfig

    @JavascriptInterface
    override fun toast(toas: String) {
        super.toast(toas)
    }

    @JavascriptInterface
    override fun finish() {
        super.finish()
    }

    @JavascriptInterface
    override fun showLoading(message: String) {
        super.showLoading(message)
    }

    @JavascriptInterface
    override fun hideLoading() {
        super.hideLoading()
    }

    @JavascriptInterface
    override fun saveBase64Img(url: String) {
        super.saveBase64Img(url)
    }

    @JavascriptInterface
    override fun addRightMenu(url: String, h5Function: String, params: String) {
        super.addRightMenu(url, h5Function, params)
    }

    @JavascriptInterface
    override fun addRightMenu2(url: String, h5Function: String, params: String) {
        super.addRightMenu2(url, h5Function, params)
    }

    @JavascriptInterface
    override fun googlePay(params: String) {
        super.googlePay(params)
    }

    @JavascriptInterface
    override fun getUserInfo(h5Function: String) {
        super.getUserInfo(h5Function)
    }
}